﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Babel.ParserGenerator;

namespace dragonangel.phpProject.Language.DSL
{
    public class CodeVariableDeclarationStatement : CodeStatement
    {
        public CodeVariableDeclarationStatement(string name, LexLocation location)
            : this(name, location, location)
        {
        }

        public CodeVariableDeclarationStatement(string name, LexLocation begin, LexLocation end)
            : this(name, false, begin, end)
        {
        }

        public CodeVariableDeclarationStatement(string name, bool asGlobal, LexLocation begin, LexLocation end)
            : base(begin, end)
        {
            this.name = name;
            this.asGlobal = asGlobal;
        }

        protected bool asGlobal;
        public bool Global
        {
            get { return asGlobal; }
            set { asGlobal = value; }
        }


        protected string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

    }
}
